// import logo from './logo.svg';
import './App.css';
// 导入路由
import {
  BrowserRouter as Router,
  Route,
  Switch,
  Redirect,
} from 'react-router-dom'
// 导入页面组件
import Login from './pages/Login'
import Layout from './pages/Layout'

function App() {
  return (
    <Router>
      <div className='App'>
        {/* 路由规则 */}
        <Switch>
          <Redirect exact from='/' to='/home'></Redirect>
          <Route path="/home" component={Layout}></Route>
          <Route path="/login" component={Login}></Route>
        </Switch>
      </div>
    </Router>
  );
}

export default App;
